<template>
    <div class="header">
        <div class="header-left">
            <div class="iconfont back-icon">&#xe642;</div>
        </div>
        <div class="header-input">
            <span class="iconfont">&#xe78d;</span>        
            输入城市/景点/游玩主题
        </div>
        <router-link to="/city">
            <div class="header-right">
                {{this.city}}
                <span class="iconfont arrow-icon">&#xe64a;</span>
            </div>
        </router-link>
        
    </div>
</template>

<script>
import { mapState, mapGetters } from "vuex";
export default {
    name: 'HomeHeader',
    data() {
        return {
            
        }
    },
    computed: {
        ...mapState(['city']),
        ...mapGetters(['doubleCity'])
    },

}
  

</script>

<style lang="stylus" scoped>
  @import '~styles/varibles.styl';
  .header
    display flex
    color #fff
    line-height .86rem
    background $bgColor
    .header-left
      width .64rem
      float left
      .back-icon{
          text-align center
          font-size .4rem
      }
    .header-input
      padding-left .2rem 
      flex 1
      line-height .64rem
      height .64rem
      color #cccccc
      margin-top .12rem
      margin-left .2rem
      background #ffffff
      border-radius .1rem
    .header-right
      min-width 1.04rem
      padding 0 .1rem 
      float right 
      text-align center
      color #fff
      .arrow-icon
        margin-left -.06rem
        font-size .1rem
    
</style>